package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/7/29 下午1:24
 */
public class MyExamineResult extends ListDataEntity implements Parcelable{

    private List<MyExamineEntity> list;

    public List<MyExamineEntity> getList() { return list;}

    public void setList(List<MyExamineEntity> list) { this.list = list;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeTypedList(this.list);
    }

    public MyExamineResult() {}

    protected MyExamineResult(Parcel in) {
        super(in);
        this.list = in.createTypedArrayList(MyExamineEntity.CREATOR);
    }

    public static final Creator<MyExamineResult> CREATOR = new Creator<MyExamineResult>() {
        @Override
        public MyExamineResult createFromParcel(Parcel source) {return new MyExamineResult(source);}

        @Override
        public MyExamineResult[] newArray(int size) {return new MyExamineResult[size];}
    };

    public static class MyExamineEntity implements Parcelable {
        /**
         * id : 204
         * ex_title : 18届华杯赛初一初赛
         * type : 2
         * score : 20
         * ystime : 0
         * kstime : 1512699022
         * type_name : 杯赛试卷
         */

        private String id;//考试记录id
        private String ex_title;//考试标题
        private String type;//考试类型id，对应type_name
        private String score;//得分
        private String ystime;//用时（00:10:20）
        private String kstime;//考试时间戳
        private String type_name;//考试名

        public String getId() { return id;}

        public void setId(String id) { this.id = id;}

        public String getEx_title() { return ex_title;}

        public void setEx_title(String ex_title) { this.ex_title = ex_title;}

        public String getType() { return type;}

        public void setType(String type) { this.type = type;}

        public String getScore() { return score;}

        public void setScore(String score) { this.score = score;}

        public String getYstime() { return ystime;}

        public void setYstime(String ystime) { this.ystime = ystime;}

        public String getKstime() { return kstime;}

        public void setKstime(String kstime) { this.kstime = kstime;}

        public String getType_name() { return type_name;}

        public void setType_name(String type_name) { this.type_name = type_name;}

        @Override
        public int describeContents() { return 0; }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.ex_title);
            dest.writeString(this.type);
            dest.writeString(this.score);
            dest.writeString(this.ystime);
            dest.writeString(this.kstime);
            dest.writeString(this.type_name);
        }

        public MyExamineEntity() {}

        protected MyExamineEntity(Parcel in) {
            this.id = in.readString();
            this.ex_title = in.readString();
            this.type = in.readString();
            this.score = in.readString();
            this.ystime = in.readString();
            this.kstime = in.readString();
            this.type_name = in.readString();
        }

        public static final Creator<MyExamineEntity> CREATOR = new Creator<MyExamineEntity>() {
            @Override
            public MyExamineEntity createFromParcel(Parcel source) {return new MyExamineEntity(source);}

            @Override
            public MyExamineEntity[] newArray(int size) {return new MyExamineEntity[size];}
        };
    }

}
